﻿<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:me="clr-namespace:WpfApplication1"
        Title="MainWindow" Height="350" Width="525"
        DataContext="{StaticResource vm}">
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="4*"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="4*"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        
        <me:MyPlayer x:Name="MediaEl" Grid.Row="0" Grid.Column="0" Source="{Binding MyVideoPath}" 
                     Status="{Binding VideoStatus, Mode=TwoWay}"  MediaOpened="MediaEL_MediaOpen"/>
        
        <StackPanel Grid.Column="1" Grid.Row="0" Orientation="Vertical" VerticalAlignment="Center">
            <Button Grid.Column="1" Grid.Row="0" Command="{Binding SetStatusCommand}" Content="Play" Height="50"
                    VerticalAlignment="Center"></Button>
        </StackPanel>
        
        <Slider Name="sliderPosition" Thumb.DragStarted="sliderPosition_DragStarted" Thumb.DragCompleted="sliderPosition_DragCompleted"
                Grid.Row="1" Grid.Column="0" Margin="10,0,10,0"  VerticalAlignment="Center"></Slider>
        
    </Grid>
</Window>
